<security:authorize ifAnyGranted="ROLE_CA, ROLE_Bank_USER, ROLE_Bond_USER,ROLE_M_AUDIT">
  <div class="box box-info">
    <div class="box-header">
      <h3 class="box-title"> <fmt:message key="attachmentDetail.heading"/></h3>
    </div><!-- /.box-header -->
    <div class="box-body" style="height: 160px;overflow-y:auto;">
      <table class="table table-condensed table-striped table-hover">
        <tr>
          <th>ID</th>
          <th><fmt:message key="attachment.name"/></th>
          <th><fmt:message key="loanRequestDetail.actionTitle"/></th>
        </tr>
          <security:authorize ifAnyGranted="ROLE_CA,ROLE_Bond_User,ROLE_Insurance">
        <tr>
          <td>1</td>
          <td><fmt:message key="businessForm"/></td>
          <td>
          <security:authorize ifAnyGranted="ROLE_CA">
          <a class="btn btn-xs" href="/export/businessForm?reqId=${loanRequest.id}" target="_blank" ><span class="label label-success"><fmt:message key="button.export"/></span></a>
            <a class="btn btn-xs" href="/uploadCaFile?reqId=${loanRequest.id}&type=businessForm"><span class="label label-danger"><fmt:message key="button.upload"/></span></a>
          </security:authorize>
<security:authorize ifAnyGranted="ROLE_Insurance,ROLE_Bond_User">
            <a class="btn btn-xs" href="/uploadCaFile/download/${loanRequest.id}/businessForm" target="_blank" ><span class="label label-primary"><fmt:message key="button.download"/></span></a>
</security:authorize>
          </td>
        </tr>
        <tr>
          <td>2</td>
          <td><fmt:message key="insuranceForm"/></td>
          <td>
            <security:authorize ifAnyGranted="ROLE_CA">
            <a class="btn btn-xs" href="/export/insuranceForm?reqId=${loanRequest.id}" target="_blank" ><span class="label label-success"><fmt:message key="button.export"/></span></a>
              <a class="btn btn-xs" href="/uploadCaFile?reqId=${loanRequest.id}&type=insuranceForm"><span class="label label-danger"><fmt:message key="button.upload"/></span></a>
            </security:authorize>
        <security:authorize ifAnyGranted="ROLE_Insurance,ROLE_Bond_User">
          <a class="btn btn-xs" href="/uploadCaFile/download/${loanRequest.id}/insuranceForm" target="_blank" ><span class="label label-primary"><fmt:message key="button.download"/></span></a>
        </security:authorize>
        </td>
        </tr>
        <tr>
                  <td>3</td>
                  <td><fmt:message key="creditForm"/></td>
                  <td>
                      <security:authorize ifAnyGranted="ROLE_CA">
                          <a class="btn btn-xs" href="/export/creditForm?reqId=${loanRequest.id}" target="_blank" >
                              <span class="label label-success"> <fmt:message key="button.export"/></span>
                          </a>
                          <a class="btn btn-xs" href="/uploadCaFile?reqId=${loanRequest.id}&type=creditForm"><span class="label label-danger"><fmt:message key="button.upload"/></span></a>
                      </security:authorize>
                      <security:authorize ifAnyGranted="ROLE_Insurance,ROLE_Bond_User">
                          <a class="btn btn-xs" href="/uploadCaFile/download/${loanRequest.id}/creditForm" target="_blank" ><span class="label label-primary"><fmt:message key="button.download"/></span></a>
                      </security:authorize>
                  </td>
              </tr>
          </security:authorize>

          <security:authorize ifAnyGranted="ROLE_Bank_USER">
              <tr>
          <td>1</td>
          <td><fmt:message key="bankInfoFile"/></td>
          <td><a class="btn btn-xs" href="/export/bankExportForm?reqId=${loanRequest.id}" target="_blank" >
           <span class="label label-primary"> <fmt:message key="button.download"/></span>
          </a></td>
        </tr>
        </security:authorize>

          <security:authorize ifAnyGranted="ROLE_M_AUDIT">
              <tr>
                  <td>1</td>
                  <td><fmt:message key="insuranceForm"/></td>
                  <td>
                      <a class="btn btn-xs" href="/uploadCaFile/download/${loanRequest.id}/insuranceForm" target="_blank" ><span class="label label-primary"><fmt:message key="button.download"/></span></a>
                  </td>
              </tr>
              <tr>
                  <td>2</td>
                  <td><fmt:message key="creditForm"/></td>
                  <td>
                      <a class="btn btn-xs" href="/uploadCaFile/download/${loanRequest.id}/creditForm" target="_blank" ><span class="label label-primary"><fmt:message key="button.download"/></span></a>
                  </td>
              </tr>
          </security:authorize>
      </table>
    </div><!-- /.box -->
  </div>
</security:authorize>